<?php
	if(!defined('BASEPATH'))
		exit('No direct script access allowed');

	class m_AdminTransactions extends CI_Model
	{
		function __construct()
    	{
    	    // Call the Model constructor
    	    parent::__construct();
    	}
		
		function get_transactions()
		{
			$this->load->database();
			$this->load->library('Datatables'); 
			$this->datatables->select('tblTransactions.TransactionTime, tblBills.Vendor, tblBills.invoiceNumber, tblBills.AccountNumber, tblBills.userId, tblBills.DueDate, tblBills.Amount, tblBills.State')->from('tblTransactions')->join('tblBills', 'tblBills.invoiceNumber = tblTransactions.invoiceNumber AND tblBills.Vendor = tblTransactions.Vendor');
			$query = $this->datatables->generate();
			return $query;
		}
	}
?>
